package controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import pojo.User;
import service.UserService;

import java.util.List;

@Controller
@RequestMapping("/user")

// /user/list
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/list")
    public String findAll() {
        List<User> users = userService.findAll(null, 0, 10);
        return "index";
    }


    @RequestMapping("/add")
    public String addUser() {
        return "index";
    }

    @RequestMapping("/delete")
    public String deleteUser() {
        return "index";
    }

    @RequestMapping("/update")
    public String updateUser() {
        return "index";
    }

    @RequestMapping("/toupdate")
    public String toUpdateUser() {
        return "index";
    }


}
